﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace hoadon
{
    class HoaDon
    {
        HoaDonDAL dal = new HoaDonDAL();
        public HoaDon()
        {

        }
        public void LuuHoaDon(string hoadon, string mahang, string diengiai, double soluong,
                              double dongia)
        {
            double trigia = soluong * dongia;
            double khuyenmai = 0.0;
            if (trigia > 20000000)
                khuyenmai = (trigia * 5) / 100;
            else
                khuyenmai = 0.0;
            dal.ThemHoaDon(hoadon, mahang, diengiai, soluong, dongia, trigia, khuyenmai);
        }

    }
}
